/*******************************************************************************
* Project: QSAR(Cute Software Architecture)
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: CanTrcvType.h
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: CanTrcv
*
*******************************************************************************/

#ifndef CANTRCVTYPE_H
#define CANTRCVTYPE_H

/** HEADER FILES **/
#include "PlatformCfg.h" 


/** MACRO DEFINITION **/


/** TYPEDEF DEFINITION **/
typedef uint8 CanTrcv_TrcvModeType;
#define CANTRCV_TRCVMODE_SLEEP ((CanTrcv_TrcvModeType)0x01)  /* Transceiver mode SLEEP */
#define CANTRCV_TRCVMODE_STANDBY ((CanTrcv_TrcvModeType)0x02)  /* Transceiver mode STANDBY */
#define CANTRCV_TRCVMODE_NORMAL ((CanTrcv_TrcvModeType)0x00)  /* Transceiver mode NORMAL */

typedef uint8 CanTrcv_TrcvWakeupReasonType;
/* Due to an error wake up reason was not detected. This value may only be reported when error was reported to DEM before */
#define CANTRCV_WU_ERROR ((CanTrcv_TrcvWakeupReasonType)0x00)
/* The transceiver does not support any information for the wake up reason */
#define CANTRCV_WU_NOT_SUPPORTED ((CanTrcv_TrcvWakeupReasonType)0x01)
/* The transceiver has detected, that the network has caused the wake up of the ECU */
#define CANTRCV_WU_BY_BUS ((CanTrcv_TrcvWakeupReasonType)0x02)
/* The transceiver has detected, that the network has woken up by the ECU via a request to NORMAL mode */
#define CANTRCV_WU_INTERNALLY ((CanTrcv_TrcvWakeupReasonType)0x03)
/* The transceiver has detected, that the "wake up" is due to an ECU reset */
#define CANTRCV_WU_RESET ((CanTrcv_TrcvWakeupReasonType)0x04)
/* The transceiver has detected, that the "wake up" is due to an ECU reset after power on */
#define CANTRCV_WU_POWER_ON ((CanTrcv_TrcvWakeupReasonType)0x05)
/* The transceiver has detected a wake-up event at one of the transceiver's pins (not at the CAN bus) */
#define CANTRCV_WU_BY_PIN ((CanTrcv_TrcvWakeupReasonType)0x06)
/* The transceiver has detected, that the wake up of the ECU was caused by a HW related device failure */
#define CANTRCV_WU_BY_SYSERR ((CanTrcv_TrcvWakeupReasonType)0x07)

typedef uint8 CanTrcv_TrcvWakeupModeType;
/* The notification for wakeup events is enabled on the addressed transceiver */
#define CANTRCV_WUMODE_ENABLE ((CanTrcv_TrcvWakeupModeType)0x00)
/* The notification for wakeup events is disabled on the addressed transceiver */
#define CANTRCV_WUMODE_DISABLE ((CanTrcv_TrcvWakeupModeType)0x01)
/* A stored wakeup event is cleared on the addressed transceiver */
#define CANTRCV_WUMODE_CLEAR ((CanTrcv_TrcvWakeupModeType)0x02)


#endif

